From: Jasper St. Pierre Date: Tue, 2 Oct 2012 19:16:56 +0000 (-0300) Subject: wanda: Use an StIcon again for createIcon X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5688 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e2ff5846df49a91413ee1749cac9ea6a74e77727;p=gnome-shell.git wanda: Use an StIcon again for createIcon With the DND bug fixed, this is no longer necessary. --- diff --git a/js/ui/wanda.js b/js/ui/wanda.js index 9850ebc9d..31b940d2e 100644 --- a/js/ui/wanda.js +++ b/js/ui/wanda.js @@ -1,11 +1,9 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- -const Clutter = imports.gi.Clutter; const GdkPixbuf = imports.gi.GdkPixbuf; const GLib = imports.gi.GLib; +const Gio = imports.gi.Gio; const Lang = imports.lang; -const Shell = imports.gi.Shell; -const Signals = imports.signals; const St = imports.gi.St; const IconGrid = imports.ui.iconGrid; @@ -169,15 +167,8 @@ const WandaSearchProvider = new Lang.Class({ // only one which speaks the truth! 'name': capitalize(fish[0]), 'createIcon': function(iconSize) { - // for DND only (maybe could be improved) - // DON'T use St.Icon here, it crashes the shell - // (dnd.js code assumes it can query the actor size - // without parenting it, while StWidget accesses - // StThemeNode in get_preferred_width/height, which - // triggers an assertion failure) - return St.TextureCache.get_default().load_icon_name(null, - 'face-smile', - iconSize); + return new St.Icon({ gicon: Gio.icon_new_for_string('face-smile'), + icon_size: iconSize }); } }]); },